package com.mis.pos.service;

import com.mis.pos.dto.ItemNumberDTO;
import com.mis.pos.dto.SaleDTO;
import com.mis.pos.entity.SaleEntity;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @Description 订单服务
 * @Author yuxiang
 * @CreatedDate 2019/11/14 15:56
 */
public interface SaleService {

    //生成一个订单
    int save(SaleEntity entity);

    //订单和商品关联表
    int saveSaleItem(List<ItemNumberDTO> dtos, Long saleId);

    //更改订单状态
    int updateSaled(Long saleId);

    //查询订单
    SaleEntity searchBySaleId(Long saleId);

    //订单列表
    List<SaleEntity>  listSale(Integer pageNumber,Integer pageSize);

    //订单总数
    Integer countSales();

    //删除订单
    int deletSaleById(Long id);
}
